package com.glsc.ngateway.common.base.domain.mysql.opmanage.report.regulatory;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Objects;

/**
 * @author: qiyr
 * @date: 2022/6/22 15:48
 * @description: 场外债券现券交易报告实体类
 */
@Data
@Entity
@Table(name = "t_reg_rpt_interotc_a1")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@IdClass(RegRptInterOtcA1.PK.class)
public class RegRptInterOtcA1 {

    @Id
    @Column(name = "main_id")
    private BigInteger mainId;

    @Column(name = "submit_org_name")
    private String submitOrgName;

    @Column(name = "submit_term")
    private String submitTerm;

    @Column(name = "submit_time")
    private String submitTime;

    @Id
    @Column(name = "row_id")
    private Integer rowId;

    /**
     * 交易所买入金额
     */
    @Column(name = "jys_mrje")
    private Double jysMrje;

    /**
     * 交易所卖出金额
     */
    @Column(name = "jys_mcje")
    private Double jysMcje;

    /**
     * 银行间买入金额
     */
    @Column(name = "yhj_mrje")
    private Double yhjMrje;

    /**
     * 银行间卖出金额
     */
    @Column(name = "yhj_mcje")
    private Double yhjMcje;

    /**
     * 期末持仓量券面金额
     */
    @Column(name = "qmcc_qmje")
    private Double qmccQmje;

    /**
     * 期末持仓量公允价值
     */
    @Column(name = "qmcc_gyjz")
    private Double qmccGyjz;

    public RegRptInterOtcA1() {
    }

    public RegRptInterOtcA1(BigInteger mainId, String submitOrgName, String submitTerm, String submitTime,
                            Integer rowId, Double jysMrje, Double jysMcje, Double yhjMrje, Double yhjMcje,
                            Double qmccQmje, Double qmccGyjz) {
        this.mainId = mainId;
        this.submitOrgName = submitOrgName;
        this.submitTerm = submitTerm;
        this.submitTime = submitTime;
        this.rowId = rowId;
        this.jysMrje = jysMrje;
        this.jysMcje = jysMcje;
        this.yhjMrje = yhjMrje;
        this.yhjMcje = yhjMcje;
        this.qmccQmje = qmccQmje;
        this.qmccGyjz = qmccGyjz;
    }

    public static class PK implements Serializable {
        private BigInteger mainId;
        private Integer rowId;

        public BigInteger getMainId() {
            return mainId;
        }

        public void setMainId(BigInteger mainId) {
            this.mainId = mainId;
        }

        public Integer getRowId() {
            return rowId;
        }

        public void setRowId(Integer rowId) {
            this.rowId = rowId;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            PK pk = (PK) o;
            return Objects.equals(mainId, pk.mainId) && Objects.equals(rowId, pk.rowId);
        }

        @Override
        public int hashCode() {
            return Objects.hash(mainId, rowId);
        }
    }

    public BigInteger getMainId() {
        return mainId;
    }

    public void setMainId(BigInteger mainId) {
        this.mainId = mainId;
    }

    public String getSubmitOrgName() {
        return submitOrgName;
    }

    public void setSubmitOrgName(String submitOrgName) {
        this.submitOrgName = submitOrgName;
    }

    public String getSubmitTerm() {
        return submitTerm;
    }

    public void setSubmitTerm(String submitTerm) {
        this.submitTerm = submitTerm;
    }

    public String getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(String submitTime) {
        this.submitTime = submitTime;
    }

    public Integer getRowId() {
        return rowId;
    }

    public void setRowId(Integer rowId) {
        this.rowId = rowId;
    }

    public Double getJysMrje() {
        return jysMrje;
    }

    public void setJysMrje(Double jysMrje) {
        this.jysMrje = jysMrje;
    }

    public Double getJysMcje() {
        return jysMcje;
    }

    public void setJysMcje(Double jysMcje) {
        this.jysMcje = jysMcje;
    }

    public Double getYhjMrje() {
        return yhjMrje;
    }

    public void setYhjMrje(Double yhjMrje) {
        this.yhjMrje = yhjMrje;
    }

    public Double getYhjMcje() {
        return yhjMcje;
    }

    public void setYhjMcje(Double yhjMcje) {
        this.yhjMcje = yhjMcje;
    }

    public Double getQmccQmje() {
        return qmccQmje;
    }

    public void setQmccQmje(Double qmccQmje) {
        this.qmccQmje = qmccQmje;
    }

    public Double getQmccGyjz() {
        return qmccGyjz;
    }

    public void setQmccGyjz(Double qmccGyjz) {
        this.qmccGyjz = qmccGyjz;
    }
}
